﻿using Microsoft.Extensions.Options;



namespace 配置系统_Json文件配置;

class ConfigController
{
    private readonly IOptionsSnapshot<Config> _optionsSnapshot;

    public ConfigController(IOptionsSnapshot<Config> optionsSnapshot)
    {
        _optionsSnapshot = optionsSnapshot;
    }

    public Config GetConfigValueTest()
    {
        return _optionsSnapshot.Value;
    }

    public string PrintName()
    {
        return _optionsSnapshot.Value.Name;
    }
}